Photonic and/or electronic devices are often made of III-V materials, but III-V substrates are expensive. Silicon substrates are relatively inexpensive, but III-V materials cannot be grown directly on them. Even when buffer layers are used, the III-V materials often contain dislocations and defects due to the lattice mismatch between the III-V materials and silicon, impairing performance of the photonic and/or electronic devices.